A sclipt (or sclip) is nothing but a piece of text, not even compiled, that will attempt to run when dropped onto a Smile text window.
The term "sclipt" refers to a "clipping of a script." To view/edit the contents of a sclipt, Cmd-drop the "Sclipt" icon on a text window.
The basic sclipt is just a script which runs when it is dropped onto a window of Smile. The special variable "theWind" of the sclipt contains a reference to the window where the sclipt was dropped.
Composite sclipts can contain more objects (buttons, for instance). Sclipts are convenient because, unlike most applications, the Finder does not need to be the front process to accept drag events. Thus, a sclipt can be dropped onto any window of Smile, while activating neither the Finder nor the window.
One method of keeping sclipts handy for use is to establish a folder of your favorite sclipts. Arrange this folder with small icons, in a narrow window, and locate it on the right side of the screen for example.
The user menus
The "Sclipts" folder of the samples provided in the "Advanced stuff" folder contains three scripts intended to handle sclipts.
• Group
You can group many different things in a sclipt. For instance: basic sclipts, buttons, and window settings. When dropped, a basic sclipt runs, a button gets installed in the target window, a set of window settings applies to the target window. Groups allows to merge several sclipt files into one.
• Make basic sclipt
Will save the selected text of the front window to disk as a sclipt. Be careful ! Smile does not check the syntax of the selected text. It is your responsibility to make sure the sclipt will run all right.
Important note: when you drop the sclipt on a window, it receives a reference to the window in the variable "theWind".
• Ungroup
Will make multiple files from a composite sclipt file. Ungroup only achieves one level of ungrouping. You may still obtain composite sclipts.
• The sclipts have been made just as an AppleScript exercise. In fact you could reproduce the same mechanism to create a new "type" of object, with a new behavior with respect to drag and drop. Edit the "DropReco" handler of the Text Window class script, and edit the "Sclipts" scripts.
• Sclipts are really nothing but a record, saved as a resource. Note that Smile can recognize different object types in records because it allows for putting a "class" property in a record, so that "class of theReco" will not return "record".